Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Restore workflow ID during execution creation #8031

Merged

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Dec 14, 2023

Summary

Restore workflow ID during execution creation removed by this PR. The missing workflow ID, and more generally the fact that workflow.id is optional when it should not be, causes PermissionChecker.check to misreport a credential as inaccessible when it should be accessible.

More generally, start reporting ID-less workflows so we can root them out and prevent this at type level.

Related tickets and issues

https://n8nio.slack.com/archives/C035KBDA917/p1702539465555529

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Dec 14, 2023
Copy link

cypress bot commented Dec 14, 2023

Passing run #3346 ↗︎

0 305 5 0 Flakiness 0

Details:

🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
Project: n8n Commit: db8e9a4bb6
Status: Passed Duration: 06:59 💡
Started: Dec 14, 2023 5:04 PM Ended: Dec 14, 2023 5:11 PM

Review all test suite changes for PR #8031 ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@ivov ivov merged commit c5e6ba8 into master Dec 14, 2023
20 checks passed
@ivov ivov deleted the fix-core-restore-workflow-id-during-execution-id-creation branch December 14, 2023 17:13
MiloradFilipovic added a commit that referenced this pull request Dec 15, 2023
* master:
  refactor(core): Warn on sqlite DB detected during init on queue mode (#8034)
  docs: Two small UI copy fixes in sub-nodes (#8032)
  fix(core): Restore workflow ID during execution creation (#8031)
  fix(core): Initialize queue once in queue mode (#8025)
  fix(editor): Add back credential `use` permission (#8023)
  fix(editor): Disable auto scroll and list size check when clicking on executions (#7983)
  fix(editor): Fix dialogVisibleChanged hooks event when meta.value is undefined (no-changelog) (#7986)
  perf(editor): Improve canvas rendering performance (#8022)
ivov added a commit that referenced this pull request Dec 15, 2023
We added ID-less workflow reporting at #8031, which has already produced
multiple reports coming from internal, enough info to tackle [this
story](https://linear.app/n8n/issue/PAY-1147). To prevent an
overwhelming number of reports from cloud, this PR removes the reporting
for now.
ivov added a commit that referenced this pull request Dec 15, 2023
## Summary
Restore workflow ID during execution creation removed by [this
PR](https://github.com/n8n-io/n8n/pull/8002/files#diff-c8cbb62ca9ab2ae45e5f565cd8c63fff6475809a6241ea0b90acc575615224af).
The missing workflow ID, and more generally the fact that `workflow.id`
is optional when it should not be, causes `PermissionChecker.check` to
misreport a credential as inaccessible when it should be accessible.

More generally, start reporting ID-less workflows so we can root them
out and prevent this at type level.

## Related tickets and issues

https://n8nio.slack.com/archives/C035KBDA917/p1702539465555529
ivov added a commit that referenced this pull request Dec 15, 2023
We added ID-less workflow reporting at #8031, which has already produced
multiple reports coming from internal, enough info to tackle [this
story](https://linear.app/n8n/issue/PAY-1147). To prevent an
overwhelming number of reports from cloud, this PR removes the reporting
for now.
@github-actions github-actions bot mentioned this pull request Dec 15, 2023
ivov added a commit that referenced this pull request Dec 15, 2023
##
[1.21.1](https://github.com/n8n-io/n8n/compare/n8n@1.21.0...n8n@1.21.1)
(2023-12-15)


### Bug Fixes

* **ActiveCampaign Node:** Fix pagination issue when loading tags
([#8017](#8017))
([d661861](d661861))
* **core:** Initialize queue once in queue mode
([#8025](#8025))
([b1c9c50](b1c9c50))
* **core:** Restore workflow ID during execution creation
([#8031](#8031))
([2d16161](2d16161)),
closes
[/github.com//pull/8002/files#diff-c8cbb62ca9ab2ae45e5f565cd8c63fff6475809a6241ea0b90acc575615224](https://github.com//github.com/n8n-io/n8n/pull/8002/files/issues/diff-c8cbb62ca9ab2ae45e5f565cd8c63fff6475809a6241ea0b90acc575615224)
* **editor:** Add back credential `use` permission
([#8023](#8023))
([cf5c723](cf5c723))
* **editor:** Disable auto scroll and list size check when clicking on
executions ([#7983](#7983))
([99d1771](99d1771))
* **editor:** Show credential share info only to appropriate users
([#8020](#8020))
([9933fce](9933fce))
* **editor:** Turn off executions list auto-refresh after leaving the
page ([#8005](#8005))
([b866a94](b866a94))

Co-authored-by: ivov <ivov@users.noreply.github.com>
@janober
Copy link
Member

janober commented Dec 15, 2023

Got released with n8n@1.21.1

netroy pushed a commit that referenced this pull request Dec 18, 2023
Restore workflow ID during execution creation removed by [this
PR](https://github.com/n8n-io/n8n/pull/8002/files#diff-c8cbb62ca9ab2ae45e5f565cd8c63fff6475809a6241ea0b90acc575615224af).
The missing workflow ID, and more generally the fact that `workflow.id`
is optional when it should not be, causes `PermissionChecker.check` to
misreport a credential as inaccessible when it should be accessible.

More generally, start reporting ID-less workflows so we can root them
out and prevent this at type level.

https://n8nio.slack.com/archives/C035KBDA917/p1702539465555529
@github-actions github-actions bot mentioned this pull request Dec 18, 2023
netroy added a commit that referenced this pull request Dec 18, 2023
## [1.18.4](https://github.com/n8n-io/n8n/compare/n8n@1.18.3...n8n@1.18.4) (2023-12-18)


### Bug Fixes

* **core:** Restore workflow ID during execution creation
([#8031](#8031))
([7add8ca](7add8ca))

Co-authored-by: netroy <netroy@users.noreply.github.com>
@github-actions github-actions bot mentioned this pull request Dec 21, 2023
ivov added a commit that referenced this pull request Dec 21, 2023
#
[1.22.0](https://github.com/n8n-io/n8n/compare/n8n@1.21.0...n8n@1.22.0)
(2023-12-21)


### Bug Fixes

* **core:** Close db connection gracefully when exiting
([#8045](#8045))
([e69707e](e69707e))
* **core:** Consider timeout in shutdown an error
([#8050](#8050))
([4cae976](4cae976))
* **core:** Do not display error when stopping jobless execution in
queue mode ([#8007](#8007))
([8e6b951](8e6b951))
* **core:** Fix shutdown if terminating before hooks are initialized
([#8047](#8047))
([6ae2f5e](6ae2f5e))
* **core:** Handle multiple termination signals correctly
([#8046](#8046))
([67bd8ad](67bd8ad))
* **core:** Initialize queue once in queue mode
([#8025](#8025))
([53c0b49](53c0b49))
* **core:** Prevent axios from force setting a form-urlencoded
content-type ([#8117](#8117))
([bba9576](bba9576))
* **core:** Remove circular references before serializing executions in
public API ([#8043](#8043))
([989888d](989888d))
* **core:** Restore workflow ID during execution creation
([#8031](#8031))
([c5e6ba8](c5e6ba8))
* **core:** Use relative imports for dynamic imports in
SecurityAuditService ([#8086](#8086))
([785bf99](785bf99))
* **core:** Stop binary data restoration from preventing execution from
finishing ([#8082](#8082))
([5ffff1b](5ffff1b))
* **editor:** Add back credential `use` permission
([#8023](#8023))
([329e5bf](329e5bf))
* **editor:** Cleanup Executions page component
([#8053](#8053))
([2689c37](2689c37))
* **editor:** Disable auto scroll and list size check when clicking on
executions ([#7983](#7983))
([fcb8b91](fcb8b91))
* **editor:** Ensure execution data overrides pinned data when copying
in executions view ([#8009](#8009))
([1d1cb0d](1d1cb0d))
* **editor:** Fix copy/paste issue when switch node is in workflow
([#8103](#8103))
([4b86926](4b86926))
* **editor:** Make keyboard shortcuts more strict; don't accept extra
Ctrl/Alt/Shift keys ([#8024](#8024))
([8df49e1](8df49e1))
* **editor:** Show credential share info only to appropriate users
([#8020](#8020))
([b29b4d4](b29b4d4))
* **editor:** Turn off executions list auto-refresh after leaving the
page ([#8005](#8005))
([e3c363d](e3c363d))
* **editor:** Update image sizes in template description not to be full
width always ([#8037](#8037))
([63a6e7e](63a6e7e))
* **ActiveCampaign Node:** Fix pagination issue when loading tags
([#8017](#8017))
([1943857](1943857))
* **HTTP Request Node:** Do not create circular references in HTTP
request node output ([#8030](#8030))
([5b7ea16](5b7ea16))
* Upgrade axios to address CVE-2023-45857
([#7713](#7713))
([64eb9bb](64eb9bb))


### Features

* Add option to `returnIntermediateSteps` for AI agents
([#8113](#8113))
([7806a65](7806a65))
* **core:** Add config option to prefer GET request over LIST when using
Hashicorp Vault ([#8049](#8049))
([439a22d](439a22d))
* **core:** Add N8N_GRACEFUL_SHUTDOWN_TIMEOUT env var
([#8068](#8068))
([614f488](614f488))
* **editor:** Add lead enrichment suggestions to workflow list
([#8042](#8042))
([36a923c](36a923c))
* **editor:** Finalize workers view
([#8052](#8052))
([edfa784](edfa784))
* **editor:** Gracefully ignore invalid payloads in postMessage handler
([#8096](#8096))
([9d22c7a](9d22c7a))
* **editor:** Upgrade frontend tooling to address a few vulnerabilities
([#8100](#8100))
([19b7f1f](19b7f1f))
* **Filter Node:** Overhaul UI by adding the new filter component
([#8016](#8016))
([3d53052](3d53052))
* **Respond to Webhook Node:** Overhaul with improvements like returning
all items ([#8093](#8093))
([32d397e](32d397e))


### Performance Improvements

* **editor:** Improve canvas rendering performance
([#8022](#8022))
([b780436](b780436))

Co-authored-by: ivov <ivov@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants